package cn.wolfcode.shop.cloud.util;

import cn.wolfcode.shop.cloud.redis.KeyPrefix;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class SeckillKeyPrefix implements KeyPrefix {

    private int expireTime;
    private String keyPrefix;

    public SeckillKeyPrefix(int expireTime, String keyPrefix) {
        this.expireTime = expireTime;
        this.keyPrefix = keyPrefix;
    }

    public SeckillKeyPrefix() {
    }

    @Override
    public int getExpireTime() {
        return this.expireTime;
    }

    @Override
    public String getKey() {
        return this.keyPrefix;
    }

    public static final SeckillKeyPrefix SECKILL_REDIS_COUNT = new SeckillKeyPrefix(0, "seckill_redis_count");
    public static final SeckillKeyPrefix SECKILL_STOCK_COUNT = new SeckillKeyPrefix(0, "seckill_stock_count:");
    public static final SeckillKeyPrefix SECKILL_GOOD_VO = new SeckillKeyPrefix(0, "seckill_good_vo");
    public static final SeckillKeyPrefix SECKILL_GOOD_COUNT = new SeckillKeyPrefix(0, "seckill_good_count");
    public static final SeckillKeyPrefix SECKILL_ = new SeckillKeyPrefix(0, "seckill_good_count");
    public static final SeckillKeyPrefix SECKILL_PATH = new SeckillKeyPrefix(60, "seckill_path");
    public static final SeckillKeyPrefix SECKILL_VERIFYCODE = new SeckillKeyPrefix(60,"seckill_verifycode");

}
